//获得配色主题中的颜色，$colorMapName配色集合map此中是下面的$color，$theme-name主题名称，$key键值
@function getColor($color-map,$theme-name:Sandy,$key:key1){
  @if map-has_key(map-get($color-map,$theme-name),$key){
    @return map-get(map-get($color-map,$theme-name),$key)
  }@else {
    @error "此map中没有相应的key";
    @return red;
  }
}

$colorDiff:10%;  //颜色加深减淡百分比
//生成颜色范围 color(1-10) | bg(1-10) | border-color(1-10)
@for $i from 1 through 10{ 
	
	$tempColor:getColor($rose-color,$rose-color-theme,key#{$i});  //当前的临时颜色
	.color#{$i}{ color:$tempColor; }
	.color#{$i}-light{ color:lighten($tempColor,$colorDiff); }
	.color#{$i}-dark{ color:darken($tempColor,$colorDiff); }
	.bg#{$i}{ background-color: $tempColor; }
	.bg#{$i}-light{ background-color: lighten($tempColor,$colorDiff); }
	.bg#{$i}-dark{ background-color: darken($tempColor,$colorDiff); }
	.border-color#{$i}{ border-color: $tempColor; }
	.border-color#{$i}-light{ border-color: lighten($tempColor,$colorDiff); }
	.border-color#{$i}-dark{ border-color: darken($tempColor,$colorDiff); }
	
	.text-first-color#{$i}::first-letter{@extend .color#{$i}}  // text.scss文件配合使用,段落的第一个文字的颜色
	
} 

